TeamsDR-Add Site with ITSP
The TeamsDR-Add Site with ITSP script adds a site to an existing Teams Direct Routing Customer, and is shown below:
Copy
### Script Version 1.3 ###
# Adding a New Site to existing Customer
# Id: 5461223
#
# Customer variables:
# ITSP_IPAddress
# ITSP_SIPPort
# ITSP_TransportType_UDP-TCP-TLS
# ITSP_MediaSecurity_Secure-Unsecure
configure network
access-list new
source-ip "{{CustomVar.ITSP_IPAddress}}"
prefixLen 32
description "{{CustomerId}}"
use-specific-interface enable
network-interface-name "eth1"
activate
exit
exit
configure voip
proxy-set new
proxy-name "{{CustomerId}}"
proxy-enable-keep-alive using-options
srd-name "DefaultSRD"
sbcipv4-sip-int-name "Cust-Public"
activate
proxy-ip 0
proxy-address "{{CustomVar.ITSP_IPAddress}}:{{CustomVar.ITSP_SIPPort}}"
transport-type "{{CustomVar.ITSP_TransportType_UDP-TCP-TLS}}"
activate
exit
exit
ip-group upsert name "{{CustomerId}}-c"
name "{{CustomerId}}-c"
proxy-set-name "{{CustomerId}}"
srd-name "DefaultSRD"
ip-profile-name "{{CustomVar.ITSP_MediaSecurity_Secure-Unsecure}}"
tags "Trunk={{SBC.OnlinePstnGateway}}.{{SBC.SbcSiteName}}"
classify-by-proxy-set disable
outbound-mesg-manipulation-set 3
call-setup-rules-set-id 1
report-metering disable
activate
exit
ip-group upsert name "{{CustomerId}}-t"
name "{{CustomerId}}-t"
proxy-set-name "Teams"
srd-name "DefaultSRD"
ip-profile-name "Teams"
local-host-name "{{SBC.OnlinePstnGateway}}"
always-use-source-addr enable
tags "Tenant={{SBC.OnlinePstnGateway}}.{{SBC.SbcSiteName}}"
classify-by-proxy-set disable
topology-location up
call-setup-rules-set-id 0
report-metering disable
{{#if SBC.EnableCAC}}
cac-profile "{{SBC.CacProfile}}"
{{/if }}
activate
exit
{{#if SBC.FlagCarrierRegistration}}
sip-definition account new
account-name "{{CustomerId}}"
served-ip-group-name "{{CustomerId}}-c"
serving-ip-group-name "{{CustomerId}}-c"
user-name "{{SBC.CarrierUserName}}"
password "{{SBC.CarrierPassword}}"
host-name "{{SBC.CarrierHostName}}"
contact-user "{{SBC.CarrierMainLine}}"
register reg
application-type sbc
activate
exit
ip-group where name "{{CustomerId}}-c"
authentication-mode sbc-as-client
username-as-client "{{SBC.CarrierUserName}}"
password-as-client "{{SBC.CarrierPassword}}"
activate
exit
{{/if }}
{{#each SBC.DialPlanPrefixes}}
sbc dial-plan where name "{{this.DialPlanName}}"
{{#each this.Rules}}
dial-plan-rule new
name "{{this.Name}}"
prefix "{{this.Prefix}}"
tag "{{this.Tag}}.{{../../SBC.SbcSiteName}}"
exit
{{/each}}
activate
exit
{{/each}}
do write